<%--
 *  File:SystemTableSummary.jsp
 *  @Author: jackyhe
 *  Date:Mar 29, 2005
 *
 *  Copyright (C) 2000 - 2005 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>
<%
  //init param
  Category cat = Category.getInstance("jsp.SystemTableSummary");
  String privilegeCode = "Z0855";
  String strModuleName = "IMG";
  String strTableName = "v_systemtable";
  String strClassType = "";
  String contextPath = request.getContextPath();
%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>
<%@ include file="/inc/CatchError.inc" %>
<%@ include file="/inc/InitEdit.inc" %>


<html>
<head>
<title></title>
<PageFlow:CheckPageFlow pageName="p_systablesum"/>
<%
    HashMap userInfo = (HashMap)session.getAttribute("userinfo");
    if(userInfo == null)
        userInfo = new HashMap();
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath%>/js/FuncLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/css/<%= strLanguageCode %>/script.js"></script>

<script language="JavaScript">
var popwindow;
function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(document.cform,actionvalue,orderbyname);
  editform.action = "SystemTableSummary.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_self";
  isRunning = true;
  parent.right.location.href = "Blank.jsp";
  editform.submit();
}

function page_click(id){
    parent.right.location.href = "SystemTableInfo.jsp?<%=OvalTools.randomURL()%>"+"&systemtableid="+id;
}

</script>
</head>
<%@ include file="/inc/SummaryDivision.inc" %>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="cform" method="post" action="<%=contextPath%>/Dispatcher">
    <input type="hidden" name="pagename" value="p_systablesum">
    <input type="hidden" name="actionname">
    <input type="hidden" name="languagecode" value="<%= strLanguageCode %>">
    <%--------------------------------------  page location   --%>
<%--    <%@ include file="/inc/PageLocation.inc" %>--%>

    <table width="100%" cellspacing="0" border="0" cellpadding="0">

      <tr>
        <td>
            <table width="100%" border="0" cellspacing="0">
                <%@ include file="/inc/SummarySearch.inc" %>
          </table>
        </td>
      </tr>
      <tr>
        <td>
        <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="99%" cellpadding="1">
        <tr>
            <td>
                 <div id=div1 style="HEIGHT: 450px; OVERFLOW: no">
                  <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
                      <tr class="deepblue-left">
                        <td class="title_center">
                            <a href="javascript:page_summary('orderby','tablename')"><%= label.getLabelName("L_VtableName") %></a>
                        </td>
                        <td class="title_center">
                            <a href="javascript:page_summary('orderby','description')"><%= label.getLabelName("L_Description") %></a>
                        </td>
                      </tr>
                <%
                    Vector vec = (Vector)pageContext.getAttribute("tables");
                    if (vec == null){
                        vec = new Vector();
                    }
                    Integer nDefaultId = new Integer(-1);
                %>
                <logic:iterate id="ps" collection="<%= vec %>" indexId="indexIwd">
                <%
                    HashMap psMap = (HashMap)ps;
                    String strIsChecked = "";

                    if((indexIwd.intValue())%2 == 1){
                        strClassType = "td-listrom";
                    }
                    else{
                        strClassType = "none";
                    }
                    if(indexIwd.intValue()==0){
                        strIsChecked = "Checked";
                        nDefaultId = (Integer)(psMap.get("itemid"));
                    }
                %>
                      <tr onMouseOver="this.className='tr-over'" onMouseOut="this.className='<%=JspHelper.filterNull( strClassType )%>'"
                                class="<%=JspHelper.filterNull( strClassType )%>">
                        <td>&nbsp;<a href="#" onclick="page_click(<oval:write property="systemtableid" name="ps"></oval:write> );"  ><oval:write name="ps" property="tablename"/></a></td>
                        <td>&nbsp;<oval:write name="ps" property="description"/></td>
                      </tr>
                    </logic:iterate>


                  </table>
                 </div>
             </td>
             </tr>
             <%@ include file="/inc/SummaryAction.inc" %>
         </table>
        </td>
      </tr>

    </table>
</form>
</body>
</html>
